<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>Spring Boot+WebSocket+广播式</title>

</head>
<body>
<noscript><h2 style="color: #ff0000">貌似你的浏览器不支持websocket</h2></noscript>

</div>

<script>
    var ws=new WebSocket("ws://127.0.0.1:8081/api/websocket");
    ws.send(JSON.stringify({"text": "123", "receiver": "13"}))
    console.log(ws.onmessage)
</script>
</body>
</html>